package com.tsing.cedap.rest.mapper;

import com.tsing.cedap.rest.entity.ExpressBrandEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tsing.cedap.rest.vo.respVo.BrandRespVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 快递品牌表 Mapper 接口
 * </p>
 *
 * @author TheTsing
 * @since 2022-01-26
 */
public interface ExpressBrandMapper extends BaseMapper<ExpressBrandEntity> {

    @Select("select c.*,cam.school_id\n" +
            "from cedap_express_brand c\n" +
            "inner join cedap_courier_station ca on c.courier_station_id=ca.id\n" +
            "inner join cedap_campus cam on ca.campus_id=cam.id\n" +
            "where c.id=#{id}")
    BrandRespVo getBrand(@Param("id") String code);

}
